<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">


    <h:head>
        <title>Plastic Gnomes</title>
    </h:head>
    <h:body>
        <h:form>
            <h3>Create Customer Account</h3>
            <p>
                    <h:outputLabel for="cr_name" value="Name: "/>
                    <h:inputText id="cr_name" value="#{customerManager.name}"/>
                    <h:outputLabel for="cr_pwd" value="Password: "/>
                    <h:inputText id="cr_pwd" value="#{customerManager.password}"/>
                    <h:outputLabel for="cr_balance" value="Balance: "/>
                    <h:inputText id="cr_balance" value="#{customerManager.balance}"/>
                    <h:commandButton value="Create" action="#{customerManager.createCustomer}"/>

            </p>
            <h3>Login</h3>
            <p>
                    <h:outputLabel for="login_name" value="Name: "/>
                    <h:inputText id="login_name" value="#{customerManager.name}"/>
                    <h:outputLabel for="login_pwd" value="Password: "/>
                    <h:inputText id="login_pwd" value="#{customerManager.password}"/>
                    <h:commandButton value="Login" action="#{customerManager.login}"/>

            </p>
        </h:form>
        <p>
            <h:outputText id="info" value="#{customerManager.info}"/>
            <h:outputText rendered="#{customerManager.info == null}"  value="Status"/>
        </p>
    </h:body>
</html>

